class Animal:
    def __init__(self,type,):
        self.type=type

    def getType(self):
        return self.type
class Dog(Animal):
    hungry = True
    def __init__(self):
        print('汪汪汪')
    def ezt(self,hungry=False):
        self.hungry=hungry
        if (self.hungry):
            print('我要吃骨头')
            self.hungry= False
        else:
            print('饱了')

animal=Animal(type='橘猫')
print(animal.getType())
dog=Dog()
print(dog.hungry)
dog.ezt(hungry=True)
dog.ezt()
dog.ezt(hungry=True)
dog.ezt()
#super().方法名访问父类方法 如；super().__init__()